from flask import Blueprint, render_template
from App.models.models import *

# 蓝图
blog = Blueprint('blog', __name__)

# 博客首页
@blog.route('/')
@blog.route('/index/')
def blog_index():
    return render_template('home/index.html')


# 博客---我的相册
@blog.route('/photos/')
def blog_photos():
    photos = PhotoModel.query.limit(6)
    return render_template('home/photos.html', photos=photos)
# 我的日记
@blog.route('/article/')
def blog_article():
    return render_template('home/article.html')


# 关于
@blog.route('/about/')
def blog_about():
    return render_template('home/about.html')